urls = { ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/GoodbyeOxford/camera/Picture004.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/GoodbyeOxford/camera/Picture200.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/MMOxford/camera/Picture400.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/MMOxford/camera/Picture509.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/StoLed/camera/Picture060.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/OxfordLateSpring/camera/Picture073.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/ParisAgain/camera/168_6814.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Barcelona/camera/167_6738.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Barcelona/camera/167_6730.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Lyon/camera/165_6532.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Lyon/camera/165_6535.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/OxfordSpring/camera/164_6422.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/MoreOxfordWinter/camera/162_6244.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/MoreOxfordWinter/camera/164_6409.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/MoreOxfordWinter/camera/162_6245.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/OxfordWinter/camera/IMG_5622.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/OxfordWinter/camera/IMG_5630.JPG', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Home/camera/img_5400.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Home/camera/img_5358.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Paris/camera/IMG_5134.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Paris/camera/IMG_5072.jpg', ...
'http://www.cs.berkeley.edu/~efros/photos/Albums/Places/camera/138_3807.JPG'};
alyosha_dir = 'D:\Projects\Databases\context_images\alyosha_images';
for i = 1:length(urls)
    im = wwwimread(urls{i});
    bn = urls{i};
    while(bn(end-3)~='.') 
        [rem, bn] = strtok(bn);
    end
    disp(bn)
    imwrite(im, [alyosha_dir '/' bn]);
end